/*错误提示*/
function checkError(data){
	var title = "Warn Message";
	try{
		var json;
		var text = data.responseText;
		if(!text){
			json = data;
		}else{
			json = eval("("+text+")"); 
		}
		
		if(json.actionError){
			var content = json.actionError;
			createDlg(title,content);
			return true;
		}
		return false;
      }catch(e){
    	createDlg(title,e);
		return true;
      }
}

/*生成错误提示窗体*/
function createDlg(title,content){
	var div = document.createElement("div");
	  var p = document.createElement("p");
	  $(p).html(content);
	  div.appendChild(p);
      $(div).attr('title',title);
  
		$(div).dialog({
			modal: true,
			buttons: {
				Ok: function() {
					$(this).dialog('close');
				}
			}
	});
}